package website.haicheng.picturemanage.commo.response;

import cn.hutool.json.JSONUtil;
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty;
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement;
import lombok.Getter;
import lombok.Setter;

/**
 * @description:
 * @author: 582895699@qq.com
 * @time: 2020/11/5 下午 10:23
 */
@Getter
@Setter
@JacksonXmlRootElement(localName = "xml")
public abstract class CommoResponse {


    /**
     * 接收方帐号（收到t的OpenID）
     */
    @JacksonXmlProperty(localName = "ToUserName")
    private String toUserName;


    /**
     * 开发者微信号
     */

    @JacksonXmlProperty(localName = "FromUserName")
    private String fromUserName = "gh_78c3775cbc9f";

    /**
     * 消息创建时间 （整型）
     */
    @JacksonXmlProperty(localName = "CreateTime")
    private Long createTime = System.currentTimeMillis();


    @Override
    public String toString() {
        return JSONUtil.toJsonStr(this);
    }
}
